home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / event.d / rcS-sulogin < prev    next >
Encoding:
Text File  |  2007-03-11  |  461 b   |  25 lines

  1. # rcS-sulogin - "single-user" runlevel compatibility
  2. #
  3. # This task runs the sulogin binary during "single-user" mode.
  4.  
  5. start on runlevel S
  6.  
  7. stop on runlevel
  8.  
  9. console owner
  10. script
  11.     runlevel --set S >/dev/null || true
  12.     /sbin/sulogin
  13.  
  14.     if [ -r /etc/inittab ]; then
  15.         RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
  16.         if [ -n "$RL" ]; then
  17.         telinit $RL
  18.         else
  19.         telinit 2
  20.         fi
  21.     else
  22.         telinit 2
  23.     fi
  24. end script
  25.